﻿@model Forest.Cat.Admin.Models.ChangePasswordModel
@{
    ViewBag.Title = "更改密码";
    Layout = "~/Administration/Views/Shared/_AdminLayout.cshtml";
}
<script type="text/javascript">
    $(document).ready(function () {
        $('#btnSubmit').bind('click', function () {
            if ($('#txtPassword').val() != $('#txtConfirmPassword').val()) {
                alert('两次密码输入不一致，请重新输入！');
                $('#txtPassword').val("");
                $('#txtConfirmPassword').val("");
                return false;
            }
        });
    });
</script>
<div class="savedsearch_manage_right">
    <div class="savedsearch_manage_right_title">
        @ViewBag.Title</div>
    <div class="savedsearch_manage_right_box">
        <div class="register_box">
            <div >
                @using (Html.BeginForm("ChangePassword", "Account", FormMethod.Post))
                {
                    @Html.ValidationMessage("pwdError")
                    <table cellpadding="0" cellspacing="0">
                        <tr>
                            <td align="right">
                                <label>
                                    原密码：</label>
                            </td>
                            <td>
                                @Html.PasswordFor(x => x.OldPassword, new { @class = "registerInput" })<br />
                                @Html.ValidationMessageFor(x => x.OldPassword)
                                &nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <label>
                                    新密码：</label>
                            </td>
                            <td>
                                @Html.PasswordFor(x => x.NewPassword, new { @class = "registerInput", @id = "txtPassword" })<br />
                                @Html.ValidationMessageFor(x => x.NewPassword)
                                &nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <label>
                                    重复新密码：</label>
                            </td>
                            <td>
                                @Html.PasswordFor(x => x.ConfirmPassword, new { @class = "registerInput", @id = "txtConfirmPassword" })<br />
                                @Html.ValidationMessageFor(x => x.ConfirmPassword)
                                &nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td>
                                &nbsp;
                            </td>
                            <td>
                                <input type="image" src="/Administration/Content/images/submit_btns.jpg" id="btnSubmit" />
                            </td>
                        </tr>
                    </table>
                }
            </div>
        </div>
    </div>
</div>
